<?php

use Biz\service\course\Course as sCourse;

class EvaluateAction extends ActionPlugin
{
    const USER_LEVEL = self::LEVEL_REALNAME;

    public function main()
    {
        $courseId = $this->getRequest()->getPost('course_id', 0);
        if (!$courseId) {
            throw new \Exception('参数错误');
        }
        $courseStart = $this->getRequest()->getPost('course_start', 0);
        $teacherStart = $this->getRequest()->getPost('teacher_start', 0);
        $ueStart = $this->getRequest()->getPost('ue_start', 0);
        $content = $this->getRequest()->getPost('content', '');
        $result = sCourse::Evaluate($this->uid, $courseId, ['course_start' => $courseStart, 'teacher_start' => $teacherStart, 'ue_start' => $ueStart, 'content' => $content]);
        $this->setSuccess();
    }
}